Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): add workspaces path if package path is not included #28824

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

xiongemi
Copy link
Collaborator

@xiongemi xiongemi commented Nov 6, 2024

Current Behavior

  • when import to a path where is not in the workspaces, it currently just shows a warning. however, it will cause an error like "module not found" because there are packages not installed.

Expected Behavior

  • automatically add to the workspaces
    Screenshot 2024-11-08 at 12 58 42 AM

Related Issue(s)

Fixes #

@xiongemi xiongemi requested a review from a team as a code owner November 6, 2024 21:38
@xiongemi xiongemi requested a review from FrozenPandaz November 6, 2024 21:38
Copy link

vercel bot commented Nov 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Dec 6, 2024 7:24am

@xiongemi xiongemi force-pushed the fix/not-import-uninstall-deps branch 9 times, most recently from e594984 to 0cf563d Compare November 8, 2024 15:41
@xiongemi xiongemi requested review from Coly010 and a team as code owners November 8, 2024 15:41
@xiongemi xiongemi force-pushed the fix/not-import-uninstall-deps branch 2 times, most recently from 356f0d7 to 86c4253 Compare November 8, 2024 17:54
packages/nx/src/command-line/import/import.ts Outdated Show resolved Hide resolved
packages/nx/src/command-line/import/import.ts Outdated Show resolved Hide resolved
packages/nx/src/command-line/import/import.ts Outdated Show resolved Hide resolved
packages/nx/src/command-line/init/init-v2.ts Outdated Show resolved Hide resolved
packages/nx/src/utils/package-manager.ts Show resolved Hide resolved
packages/nx/src/utils/package-manager.ts Outdated Show resolved Hide resolved
packages/nx/src/utils/package-manager.ts Outdated Show resolved Hide resolved
@xiongemi xiongemi force-pushed the fix/not-import-uninstall-deps branch from 4438b44 to ae74ec7 Compare December 6, 2024 07:16
@xiongemi xiongemi merged commit 902eef5 into master Dec 6, 2024
6 checks passed
@xiongemi xiongemi deleted the fix/not-import-uninstall-deps branch December 6, 2024 16:25
FrozenPandaz pushed a commit that referenced this pull request Dec 6, 2024
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->
- when import to a path where is not in the workspaces, it currently
just shows a warning. however, it will cause an error like "module not
found" because there are packages not installed.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
- automatically add to the workspaces
![Screenshot 2024-11-08 at 12 58
42 AM](https://github.com/user-attachments/assets/d36dd093-a0ce-45c3-a783-97244741971f)

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #

(cherry picked from commit 902eef5)
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants